#ifndef __SERIAL__
#define __SERIAL__

/* Serial port structure */
struct TSerial;
/* Serial ports 1 and 2 */
extern struct TSerial *serial1;
extern struct TSerial *serial2;

void Serial_Initialize(int baudrate, int read_timeout, int write_timeout);
/* Clear all received and buffered data */
void Serial_Clear();

/* Put all symbols of string until terminator to specified serial */
void putstring(const char *string, struct TSerial *serial);

/* Get string from stdin until line feed 
 * without full feeds at the start
 */
char *gets_trim(char *string);

#endif

